x86: fix frame table initialization when hotplug memory regions were detected
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 4 Feb 2010 08:53:16 +0000 (08:53 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 4 Feb 2010 08:53:16 +0000 (08:53 +0000)
commit265394cb0d325a66f6bcc047ad79afdaeeb32161
tree810b0e13670f06d9e006c158aa80e4e582514800
parent37ee852d252d77537c645a978608e65b9673ad88
x86: fix frame table initialization when hotplug memory regions were detected

max_idx is not a pdx, and hence needs to be converted to one in all
cases where it is being passed to pdx_to_page().

Also, just like for max_pdx, the conversion result of max_idx may
point into an address space hole, and hence it must not be used
directly as an argument to pdx_to_page(). Note that this doesn't apply
to the arguments passed to memset(), as the size argument would be
zero in the case of hitting an address space hole.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/mm.c